<template>
	<view>
		<view class="box" v-for="(item,index) in notice" :key="index">
			<view class="img" :class="im[index]"></view>
			<view class="middle">
				<view class="title">{{item.title}}</view>
				<view class="text">{{item.text}}</view>
			</view>
			<view class="rightNotice">
				<uni-badge :text="item.badge" type="success" class="dottedNotice" size="small"></uni-badge>
			</view>
		</view>
	</view>
</template>

<script>
	const {notice} = require('../../../utils/api.js')
	export default {
		data() {
			return {
				im:["img7","img8","img9"],
				notice:[]
			}
		},
		created() {
			this.getNotice();
		},
		methods:{
			getNotice(){
				notice().then(data=>{
					this.notice = data.data
				})
			},
		}
	}
</script>

<style scoped src="../../../static/css/msg.css"></style>
